package com.leancloud.home.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.aries.ui.view.title.TitleBarView;
import com.leancloud.home.R;

import tech.com.commoncore.base.BaseTitleActivity;
import tech.com.commoncore.utils.OnNoDoubleClickListener;

/**
 * 认购份额计算
 */
public class SubscriptionActivity extends BaseTitleActivity {


    private EditText etSubscriptionAmount;
    private EditText etNetWorth;
    private EditText etSubscriptionRates;
    private EditText etInterbankInterestRate;
    private TextView tvSubscriptionDate;
    private TextView tvDateOfEstablishment;
    private Button btnStart;
    private Button btnAgain;
    private TextView tvSubscriptionFee;
    private TextView tvInterestCarryForward;
    private TextView tvSubscriptionQuota;

    @Override
    public void setTitleBar(TitleBarView titleBar) {
        titleBar.setTitleMainText(getResources().getString(R.string.home_subscription_title));
    }

    @Override
    public int getContentLayout() {
        return R.layout.home_activity_subscription;
    }

    @Override
    public void initView(Bundle savedInstanceState) {
        //认购金额
        etSubscriptionAmount = (EditText) findViewById(R.id.et_subscription_amount);
        //单位份额基金净值
        etNetWorth = (EditText) findViewById(R.id.et_net_worth);
        //认购费率
        etSubscriptionRates = (EditText) findViewById(R.id.et_subscription_rates);
        //同业存款利率
        etInterbankInterestRate = (EditText) findViewById(R.id.et_interbank_interest_rate);
        //认购日期
        tvSubscriptionDate = (TextView) findViewById(R.id.tv_subscription_date);
        //成立日期
        tvDateOfEstablishment = (TextView) findViewById(R.id.tv_date_of_establishment);
        //认购手续费
        tvSubscriptionFee = (TextView) findViewById(R.id.tv_subscription_fee);
        //认购期利息结转
        tvInterestCarryForward = (TextView) findViewById(R.id.tv_interest_carry_forward);
        //认购份额
        tvSubscriptionQuota = (TextView) findViewById(R.id.tv_subscription_quota);
        btnStart = (Button) findViewById(R.id.btn_start);
        btnAgain = (Button) findViewById(R.id.btn_again);

        btnStart.setOnClickListener(new OnNoDoubleClickListener() {
            @Override
            public void onNoDoubleClick(View v) {

            }
        });
        btnAgain.setOnClickListener(new OnNoDoubleClickListener() {
            @Override
            public void onNoDoubleClick(View v) {

            }
        });
    }
}
